import request from '@/router/axios'

/*
* 新建标签组
* */
export function addLabelGroup(obj) {
    return request({
        url: '/cp/workcontacttaggroup',
        method: 'post',
        data: obj
    })
}

/*
* 获取标签组列表
* */
export function getCustomerLabelList(query) {
    return request({
        url: '/cp/workcontacttaggroup/page',
        method: 'get',
        params: query
    })
}

/*
* 查看标签列表
* */
export function watchRowList(groupId) {
    return request({
        url: '/cp/workcontacttag/page?groupId=' + groupId,
        method: 'get',
    })
}

/*
* 编辑标签
*/
export function editLabelGroup(obj) {
    return request({
        url: '/cp/workcontacttaggroup',
        method: 'put',
        data: obj
    })
}

/*
* 同步标签
*/
export function synLabel() {
    return request({
        url: '/cp/workcontacttag/syncontacttag',
        method: 'put',
    })
}

/*
* 删除标签
*/
export function deleteLabel(groupId) {
    return request({
        url: `/cp/workcontacttaggroup/${groupId}`,
        method: 'delete',
    })
}
/*
* 新建标签
* */
export function addLabel(obj) {
    return request({
        url: '/cp/workcontacttag/save',
        method: 'post',
        data: obj
    })
}